import zmq
import random
import time
import sys

ctx = zmq.Context.instance()
socket = ctx.socket(zmq.PULL)
socket.bind("tcp://*:5558")

s = socket.recv()

start_time = time.time()

for i in range(100):
    s = socket.recv()

    if (i / 10 ) * 10 == i:
        print ":",
    else:
        print ".",
    sys.stdout.flush()

print 'total elapsed time %d s' % (time.time() - start_time)

socket.close()
ctx.destroy()